<%@page import="com.dfhc.util.StringHelper"%>
<%@page import="com.dfhc.util.CryptoHelper"%>
<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico" />

<!-- 全局js 和css包 -->
<%@ include file="/jsp/include/web/new/global.jsp" %>
<title>添加团体视图 </title>

<%@ taglib uri="/dfhc" prefix="dfhc" %>
</head>
<body>


<article class="page-container">









	<form action="" method="post" class="form form-horizontal" id="form-rmpartyview-add">
	   <input type="hidden" id="id" name="id" value="${bean.id}">
							
							
	    <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title"><dfhc:span templateId="h_ui_not_null_span"></dfhc:span>业务关键字：</dfhc:title>	    
	    <dfhc:div templateId="h_ui_div_label_div">	        
			<dfhc:input templateId="h_ui_input" value="${bean.bs_keyword}" placeholder="" id="bs_keyword" name="bs_keyword"/>			
	    </dfhc:div>	    		 
	  </dfhc:div>
	  
	  <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title"><dfhc:span templateId="h_ui_not_null_span"></dfhc:span>名称：</dfhc:title>	    
	    <dfhc:div templateId="h_ui_div_label_div">	        
			<dfhc:input templateId="h_ui_input" value="${bean.name}" placeholder="" id="name" name="name"/>			
	    </dfhc:div>	 	    		 
	  </dfhc:div>
							
	    <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title">规则描述：</dfhc:title>	    
	    <dfhc:div templateId="h_ui_div_label_div">	        
			<dfhc:input templateId="h_ui_input" value="${bean.view_desc}" placeholder="" id="view_desc" name="view_desc"/>			
	    </dfhc:div>	    		 
	  </dfhc:div>
							
		<dfhc:div templateId="h_ui_div_row_cl">
			<dfhc:div templateId="h_ui_div_pop_up_button">
				<dfhc:button templateId="h_ui_submit_button" />
			</dfhc:div>
		</dfhc:div>
	</form>
</article>



<script type="text/javascript">
$(function(){
	//获取新id
	<c:if test="${empty bean}"> 
	$('#id').val(getNewId('rm_party_view'));
	</c:if>


	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
	$("#form-rmpartyview-add").validate({
		rules:{
			bs_keyword:{			
				required:true,
				minlength:1,
				maxlength:50
			},
			name:{			
				required:true,
				minlength:1,
				maxlength:200
			},
			view_desc:{			
				maxlength:4000
			}
		},
 		messages: {
			bs_keyword:{
		        required: "请输入BS_KEYWORD",
		        minlength: "BS_KEYWORD至少由1个字母组成",
		        maxlength: "BS_KEYWORD最大长度为50个字母"
	           },
			name:{
		        required: "请输入NAME",
		        minlength: "NAME至少由1个字母组成",
		        maxlength: "NAME最大长度为200个字母"
	           },
			view_desc:{
		        maxlength: "VIEW_DESC最大长度为4000个字母"
	           }
	    },		
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler:function(form){
			<c:if test="${empty bean}"> 
			var url = getRootPath()+'<%=CryptoHelper.encryptUrl(request,"/rmpartyview/insert")%>'+'?jsguid='+$('#id').val();
			</c:if>
			<c:if test="${not empty bean}">
			var url = getRootPath()+'<%=CryptoHelper.encryptUrl(request,"/rmpartyview/update")%>'+'?jsguid='+$('#id').val(); 
			</c:if>
			//提交成功关闭
			submitAjax(url,$("#form-rmpartyview-add").serialize(),getRootPath()+"/rmpartyview"); 		    		    		
		}
	});
});
</script> 
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
